package com.nut.lmsc.enums;

import lombok.Getter;

import java.util.HashMap;
import java.util.Map;

/**
 * 文件路径 1医院 2商品 3会员
 */
@Getter
public enum FilePathEnum {

    Hospital(1, "hospital"),
    Goods(2, "goods"),
    Member(3, "member"),
    Circle(4, "circle"),
    ;

    private Integer value;

    private String dir;

    FilePathEnum(Integer value, String dir) {
        this.value = value;
        this.dir = dir;
    }

    private static Map<Integer, FilePathEnum> map = new HashMap<>();

    static {
        for (FilePathEnum filePathEnum : FilePathEnum.values()) {
            map.put(filePathEnum.value, filePathEnum);
        }
    }

    public static FilePathEnum valueOf(int value) {
        return map.get(value);
    }
}
